from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import StrOutputParser
from patagent.llm import PatsnapLLM
from patagent.prompt import DIM_TABLE_QUALITY_PROMPT

llm = PatsnapLLM()

# Prompt
prompt = ChatPromptTemplate.from_messages(
    [
        ("system", DIM_TABLE_QUALITY_PROMPT),
        ("human", "{question}"),
    ]
)

# Chain
dim_table_report_chain = prompt | llm | StrOutputParser()